﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
    xmlns:pb="clr-namespace:Spritehand.PhysicsBehaviors;assembly=Spritehand.PhysicsBehaviors"
	x:Class="DemoBehaviors5.ucSwimsuit" Height="156.5" Width="74.333">

	<Canvas x:Name="LayoutRoot" Height="400" Width="200">
		<Canvas x:Name="rightThigh" CacheMode="BitmapCache" Height="52" Width="32" Canvas.Left="8" Canvas.Top="59">
			<i:Interaction.Behaviors>
				<pb:PhysicsObjectBehavior Mass="0.2"/>
			</i:Interaction.Behaviors>
			<Image Height="52" Width="32" Source="_rightThigh.png" Stretch="Fill"/>
		</Canvas>
		<Canvas x:Name="armRight" CacheMode="BitmapCache" Height="48" Width="28" Canvas.Top="32">
			<i:Interaction.Behaviors>
				<pb:PhysicsObjectBehavior Mass="0.2"/>
			</i:Interaction.Behaviors>
			<Image Height="48" Width="28" Source="_armRight.png" Stretch="Fill"/>
		</Canvas>
		<Canvas x:Name="body" CacheMode="BitmapCache" Height="59" Width="33" Canvas.Left="13" Canvas.Top="22">
			<i:Interaction.Behaviors>
				<pb:PhysicsObjectBehavior Mass="0.6"/>
			</i:Interaction.Behaviors>
			<i:Interaction.Triggers>
				<i:EventTrigger>
					<pb:PhysicsApplyRotationBehavior RotateValue="90"/>
				</i:EventTrigger>
			</i:Interaction.Triggers>
			<Image Height="59" Width="33" Source="_body.png" Stretch="Fill"/>
		</Canvas>
		<Canvas x:Name="head" CacheMode="BitmapCache" Height="31" Width="33" Canvas.Left="11">
			<i:Interaction.Behaviors>
				<pb:PhysicsObjectBehavior Mass="0.2"/>
			</i:Interaction.Behaviors>
			<Image Height="31" Width="33" Source="_head.png" Stretch="Fill"/>
		</Canvas>
		<Canvas x:Name="rightCalf" CacheMode="BitmapCache" Height="43" Width="18" Canvas.Left="15" Canvas.Top="105">
			<i:Interaction.Behaviors>
				<pb:PhysicsObjectBehavior Mass="0.2"/>
			</i:Interaction.Behaviors>
			<Image Height="43" Width="18" Source="_rightCalf.png" Stretch="Fill"/>
		</Canvas>
		<Canvas x:Name="leftThigh" CacheMode="BitmapCache" Height="43" Width="21" Canvas.Left="24" Canvas.Top="68">
			<i:Interaction.Behaviors>
				<pb:PhysicsObjectBehavior Mass="0.2"/>
			</i:Interaction.Behaviors>
			<Image Height="43" Width="21" Source="_leftThigh.png" Stretch="Fill"/>
		</Canvas>
		<Canvas x:Name="armLeft" CacheMode="BitmapCache" Height="57" Width="21" Canvas.Left="25" Canvas.Top="23">
			<i:Interaction.Behaviors>
				<pb:PhysicsObjectBehavior Mass="0.2"/>
			</i:Interaction.Behaviors>
			<Image Height="57" Width="21" Source="_armLeft.png" Stretch="Fill"/>
		</Canvas>
		<Canvas x:Name="rightFoot" CacheMode="BitmapCache" Height="14" Width="26" Canvas.Left="7" Canvas.Top="136">
			<i:Interaction.Behaviors>
				<pb:PhysicsObjectBehavior Mass="0.1"/>
			</i:Interaction.Behaviors>
			<Image Height="14" Width="26" Source="_rightFoot.png" Stretch="Fill"/>
		</Canvas>
		<Ellipse Fill="#FFD0D833" Stroke="Black" Height="7" Width="7" Canvas.Left="20" Canvas.Top="104">
			<i:Interaction.Behaviors>
				<pb:PhysicsJointBehavior AngleSpringConstant="10000" AngleSpringEnabled="False" BodyOne="rightThigh" BodyTwo="rightCalf" CollisionGroup="1" AngleLimitLower="-75" AngleLimitUpper="0"/>
			</i:Interaction.Behaviors>
		</Ellipse>
		<Canvas x:Name="leftCalf" CacheMode="BitmapCache" Height="46" Width="20" Canvas.Left="26" Canvas.Top="103">
			<i:Interaction.Behaviors>
				<pb:PhysicsObjectBehavior Mass="0.2"/>
			</i:Interaction.Behaviors>
			<Image Height="46" Width="20" Source="_leftCalf.png" Stretch="Fill"/>
		</Canvas>
		<Canvas x:Name="leftFoot" CacheMode="BitmapCache" Height="13" Width="20" Canvas.Left="25" Canvas.Top="140">
			<i:Interaction.Behaviors>
				<pb:PhysicsObjectBehavior Mass="0.1"/>
			</i:Interaction.Behaviors>
			<Image Height="13" Width="20" Source="_leftFoot.png" Stretch="Fill"/>
		</Canvas>
		<Ellipse Fill="#FFD0D833" Stroke="Black" Height="7" Width="7" Canvas.Left="24" Canvas.Top="22">
			<i:Interaction.Behaviors>
				<pb:PhysicsJointBehavior AngleSpringConstant="10000" AngleSpringEnabled="True" BodyOne="body" BodyTwo="head" CollisionGroup="1"/>
			</i:Interaction.Behaviors>
		</Ellipse>
		<Ellipse Fill="#FFD0D833" Stroke="Black" Height="7" Width="7" Canvas.Left="29" Canvas.Top="104">
			<i:Interaction.Behaviors>
				<pb:PhysicsJointBehavior AngleSpringConstant="10000" AngleSpringEnabled="False" BodyOne="leftThigh" BodyTwo="leftCalf" CollisionGroup="1" AngleLimitLower="-75" AngleLimitUpper="0"/>
			</i:Interaction.Behaviors>
		</Ellipse>
		<Ellipse Fill="#FFD0D833" Stroke="Black" Height="7" Width="7" Canvas.Left="22" Canvas.Top="137">
			<i:Interaction.Behaviors>
				<pb:PhysicsJointBehavior AngleSpringConstant="10000" AngleSpringEnabled="True" BodyOne="rightCalf" BodyTwo="rightFoot" CollisionGroup="1"/>
			</i:Interaction.Behaviors>
		</Ellipse>
		<Ellipse Fill="#FFD0D833" Stroke="Black" Height="7" Width="7" Canvas.Left="34" Canvas.Top="140">
			<i:Interaction.Behaviors>
				<pb:PhysicsJointBehavior AngleSpringConstant="10000" AngleSpringEnabled="True" BodyOne="leftCalf" BodyTwo="leftFoot" CollisionGroup="1"/>
			</i:Interaction.Behaviors>
		</Ellipse>
		<Ellipse Fill="#FFD0D833" Stroke="Black" Height="7" Width="7" Canvas.Left="23" Canvas.Top="29">
			<i:Interaction.Behaviors>
				<pb:PhysicsJointBehavior AngleSpringConstant="10000" AngleSpringEnabled="True" BodyOne="body" BodyTwo="armRight" CollisionGroup="1"/>
			</i:Interaction.Behaviors>
		</Ellipse>
		<Ellipse Fill="#FFD0D833" Stroke="Black" Height="7" Width="7" Canvas.Left="23" Canvas.Top="70">
			<i:Interaction.Behaviors>
				<pb:PhysicsJointBehavior AngleSpringConstant="10000" AngleSpringEnabled="True" BodyOne="body" BodyTwo="rightThigh" CollisionGroup="1"/>
			</i:Interaction.Behaviors>
		</Ellipse>
		<Ellipse Fill="#FFD0D833" Stroke="Black" Height="7" Width="7" Canvas.Left="33" Canvas.Top="29">
			<i:Interaction.Behaviors>
				<pb:PhysicsJointBehavior AngleSpringConstant="10000" AngleSpringEnabled="True" BodyOne="body" BodyTwo="armLeft" CollisionGroup="1"/>
			</i:Interaction.Behaviors>
		</Ellipse>
		<Ellipse Fill="#FFD0D833" Stroke="Black" Height="7" Width="7" Canvas.Left="31" Canvas.Top="70">
			<i:Interaction.Behaviors>
				<pb:PhysicsJointBehavior AngleSpringConstant="10000" AngleSpringEnabled="True" BodyOne="body" BodyTwo="leftThigh" CollisionGroup="1"/>
			</i:Interaction.Behaviors>
		</Ellipse>
	</Canvas>
</UserControl>